﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<UserControl
  xmlns="http://schemas.microsoft.com/client/2007"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls"
  xmlns:charting="clr-namespace:Microsoft.Windows.Controls.DataVisualization.Charting;assembly=Microsoft.Windows.Controls.DataVisualization"
  xmlns:samples="clr-namespace:Microsoft.Windows.Controls.Samples;assembly=Microsoft.Windows.Controls.Samples.Common"
  x:Class="Microsoft.Windows.Controls.Samples.ScatterSample">
    <StackPanel>

        <!-- Scenarios -->
        <ContentControl Content="Scenarios" Style="{StaticResource Header}"/>

        <controls:WrapPanel>

            <!-- Typical Use -->
            <Grid Style="{StaticResource WrapperStyle}">
                <charting:Chart Title="Typical Use">
                    <charting:Chart.Series>
                        <charting:ScatterSeries
                            Title="Particulate Levels"
                            ItemsSource="{Binding LevelsInRainfall, Source={StaticResource ParticulateLevel}}"
                            IndependentValueBinding="{Binding Rainfall}"
                            DependentValueBinding="{Binding Particulate}" />
                    </charting:Chart.Series>
                </charting:Chart>
            </Grid>

        </controls:WrapPanel>


        <!-- Generated Charts -->
        <ContentControl Content="Generated Charts" Style="{StaticResource Header}"/>
        <controls:WrapPanel x:Name="GeneratedChartsPanel"/>

        <src:SourceViewer xmlns:src="clr-namespace:Microsoft.Windows.Controls.Samples;assembly=Microsoft.Windows.Controls.Samples.Common" xmlns:sys="clr-namespace:System;assembly=mscorlib">
  <src:SourceFile Path="ScatterSample.xaml">
    <src:SourceFile.Source>
      <sys:String>&lt;!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
--&gt;

&lt;UserControl
  xmlns="http://schemas.microsoft.com/client/2007"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls"
  xmlns:charting="clr-namespace:Microsoft.Windows.Controls.DataVisualization.Charting;assembly=Microsoft.Windows.Controls.DataVisualization"
  xmlns:samples="clr-namespace:Microsoft.Windows.Controls.Samples;assembly=Microsoft.Windows.Controls.Samples.Common"
  x:Class="Microsoft.Windows.Controls.Samples.ScatterSample"&gt;
    &lt;StackPanel&gt;

        &lt;!-- Scenarios --&gt;
        &lt;ContentControl Content="Scenarios" Style="{StaticResource Header}"/&gt;

        &lt;controls:WrapPanel&gt;

            &lt;!-- Typical Use --&gt;
            &lt;Grid Style="{StaticResource WrapperStyle}"&gt;
                &lt;charting:Chart Title="Typical Use"&gt;
                    &lt;charting:Chart.Series&gt;
                        &lt;charting:ScatterSeries
                            Title="Particulate Levels"
                            ItemsSource="{Binding LevelsInRainfall, Source={StaticResource ParticulateLevel}}"
                            IndependentValueBinding="{Binding Rainfall}"
                            DependentValueBinding="{Binding Particulate}" /&gt;
                    &lt;/charting:Chart.Series&gt;
                &lt;/charting:Chart&gt;
            &lt;/Grid&gt;

        &lt;/controls:WrapPanel&gt;


        &lt;!-- Generated Charts --&gt;
        &lt;ContentControl Content="Generated Charts" Style="{StaticResource Header}"/&gt;
        &lt;controls:WrapPanel x:Name="GeneratedChartsPanel"/&gt;
    &lt;/StackPanel&gt;
&lt;/UserControl&gt;</sys:String>
    </src:SourceFile.Source>
  </src:SourceFile>
  <src:SourceFile Path="ScatterSample.xaml.cs">
    <src:SourceFile.Source>
      <sys:String>// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System.Windows.Controls;
using Microsoft.Windows.Controls.DataVisualization.Charting;
using System.ComponentModel;

namespace Microsoft.Windows.Controls.Samples
{
    /// &lt;summary&gt;
    /// Sample page demonstrating ScatterSeries.
    /// &lt;/summary&gt;
    [Sample("(1)Scatter Series", DifficultyLevel.Basic)]
    [Category("Scatter Series")]
    public partial class ScatterSample : UserControl
    {
        /// &lt;summary&gt;
        /// Initializes a new instance of the ScatterSample class.
        /// &lt;/summary&gt;
        public ScatterSample()
        {
            InitializeComponent();

            SampleGenerators.GenerateNumericSeriesSamples(GeneratedChartsPanel, () =&gt; new ScatterSeries(), true);
            SampleGenerators.GenerateDateTimeValueSeriesSamples(GeneratedChartsPanel, () =&gt; new ScatterSeries());
            SampleGenerators.GenerateValueValueSeriesSamples(GeneratedChartsPanel, () =&gt; new ScatterSeries());
            SampleGenerators.GenerateMultipleValueSeriesSamples(GeneratedChartsPanel, () =&gt; new ScatterSeries(), true);
        }
    }
}</sys:String>
    </src:SourceFile.Source>
  </src:SourceFile>
</src:SourceViewer>
    </StackPanel>
</UserControl>